package com.java.thread.exer3;

/**
 * @author luzhikun
 * @date &{DATE}-20:11
 */
public class ThreadTest {
    public static void main(String[] args) {
        MyThread myThread = new MyThread("线程一");
        myThread.start();
    }
}

class MyThread extends Thread {
    public MyThread(String name) {
        super(name);
    }

    public void run() {
        for (int i = 0; i < 100; i++) {
            if (i % 2 == 0) {
                System.out.println(getName() + " " + i);
            }
        }
    }

}
